feat: add FromPropertyValue trait - #72
Conversation
| } | ||
| } | ||
|
|
||
| /// Returns the value of the standard `reg` property. |
There was a problem hiding this comment.
This is the part I dislike the most. Because of the differences in lifetimes between the fdt and model APIs, I don't think it's possible to avoid code duplication and maintain the ability to use the standard API while dropping the node objects it operates on - something tested by the newly added standard_node_outlives_wrapper test.
These kind of problems might suggest that maybe the GAT refactor from #29 wasn't the best idea ever - we traded the lifetime accuracy and code simplicity for better user ergonomics. Perhaps it's worth rolling back the change, and instead of trying to unify the read and write APIs, just rely on explicit to_read() method on the read APIs that would return a view of Node/Property.
If you have any thoughts on this @qwandor, I'm happy to hear them.
There was a problem hiding this comment.
I was a never a massive fan of the GAT refactor, so I'm happy for it to be rolled back if that helps avoid tying lifetimes together unneccessarily.
There was a problem hiding this comment.
Sounds good to me. I'll experiment with rolling back the GAT refactor in one of the future PRs and we'll see what happens.
| } | ||
| } | ||
|
|
||
| /// Returns the value of the standard `reg` property. |
There was a problem hiding this comment.
I was a never a massive fan of the GAT refactor, so I'm happy for it to be rolled back if that helps avoid tying lifetimes together unneccessarily.
4b143d6 to
645686b
Compare
No description provided.